package com.yitao.cms.config.permission;


import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

@Configuration
@Aspect
public class PermissionAdvice {
    @Pointcut("@annotation(com.yitao.cms.config.permission.PermissionMark)")
    public void excuteController() {
    }

    @Around("excuteController()")
    public Object around(ProceedingJoinPoint point) throws Throwable {

        return point.proceed();
    }

}
